﻿using Orleans;
using Pay.Model.Dto;
using Pay.Model.Interfaces;
using Pay.Model.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.Service
{
   public  interface IOrderService:IGrainWithStringKey
    {
        Task<long> Add(OrderInfo model);


        Task<bool> Update(OrderInfo model);

        Task<OrderInfo> GetById(long orderId);

        /// <summary>
        /// 分页
        /// </summary>
        /// <param name="searchWord"></param>
        /// <param name="merchantId"></param>
        /// <param name="timeBegin"></param>
        /// <param name="timeEnd"></param>
        /// <param name="offset"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        Task<IPagedOutput<OrderInfo>> GetPage(string searchWord, long? merchantId, DateTime? timeBegin = null, DateTime? timeEnd = null, int offset = 10, int rows = 1);
        /// <summary>
        /// 统计
        /// </summary>
        /// <param name="searchWord"></param>
        /// <param name="merchantId"></param>
        /// <param name="timeBegin"></param>
        /// <param name="timeEnd"></param>
        /// <param name="offset"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        Task<IPagedOutput<StatisticModel>> GetPageStatistic(string searchWord, long? merchantId, DateTime? timeBegin = null, DateTime? timeEnd = null, int offset = 10, int rows = 1);
    }
}
